dojo.declare("DVendorItemProductCatalogPg", wm.Page, {
start: function() {
},
"preferredDevice": "desktop",
itemsDojoGridImageUrlFormat: function(inValue, rowId, cellId, cellField, cellObj, rowObj) {
try {
var file = "services/FileUploadDownload.download?method=downloadFile&fileName=" + inValue;
return '<img  style="height: 50px;" src="' + inValue + '" />';
} catch (e) {
console.error('ERROR IN dojoGrid2PicurlFormat: ' + e);
}
},
lvVendorsSuccess: function(inSender, inDeprecated) {
var item = this.selectMenu1.dataSet.getItem(0);
this.selectMenu1.setDataValue(item);
},
itemsNewButtonClick1: function(inSender) {
this.dojoFileUpload1.reset();
this.itemsDojoGrid.deselectAll();
this.dojoFileUpload1.reset();
var item = this.selectMenu1.selectedItem;
this.lookup1.setDataValue(item);
var result = this.itemsDojoGrid.getRowCount();
if(result > 0)
{
var VAT =  this.itemsDojoGrid.getCell(result - 1,"vat");
var EduCess =  this.itemsDojoGrid.getCell(result - 1,"eduCess");
var ServiceTax =  this.itemsDojoGrid.getCell(result - 1,"serviceTax");
var ServiceCharge =  this.itemsDojoGrid.getCell(result - 1,"serviceCharge");
var TpsShareIncPer =  this.itemsDojoGrid.getCell(result - 1,"tpsPercentIncl");
var TpsShareExclPer =  this.itemsDojoGrid.getCell(result - 1,"tpsPercentExl");
var TpsShareIncl =  this.itemsDojoGrid.getCell(result - 1,"tpsShareIncl");
var TpsShareExcl =  this.itemsDojoGrid.getCell(result - 1,"tpsShareExl");
var unit =  this.itemsDojoGrid.getCell(result - 1,"unit");
var services =  this.itemsDojoGrid.getCell(result - 1,"services.serviceName");
var currency =  this.itemsDojoGrid.getCell(result - 1,"currency");
this.txtVAT.setDataValue(VAT);
this.txtEduCess.setDataValue(EduCess);
this.txtServiceTax.setDataValue(ServiceTax);
this.txtServiceCharge.setDataValue(ServiceCharge);
this.txtTpsShareIncPer.setDataValue(TpsShareIncPer);
this.txtTpsShareExclPer.setDataValue(TpsShareExclPer);
this.txtTpsShareIncl.setDataValue(TpsShareIncl);
this.txtTpsShareExcl.setDataValue(TpsShareExcl);
this.activeEditor1.setChecked(true);
var item = this.selectMenu2.dataSet.getItem(0);
this.selectMenu2.setDataValue("Food");
this.selectMenu3.setDataValue(unit);
this.lookup2.setDataValue(services);
this.otherNamesEditor3.setDataValue(currency)
}
// this.itemsLiveForm1.clearData();
},
calculateFinalprice: function() {
var vatPercent = this.txtVAT.getDataValue();
var eduCess = this.txtEduCess.getDataValue();
var serviceTax = this.txtServiceTax.getDataValue();
var serviceCharge = this.txtServiceCharge.getDataValue();
var tpsPercInc = this.txtTpsShareIncPer.getDataValue();
var tpsPerExcl = this.txtTpsShareExclPer.getDataValue();
var tpsShareInc = this.txtTpsShareIncl.getDataValue();
var tpsShareExcl = this.txtTpsShareExcl.getDataValue();
var basePrice = this.txtBasePrice.getDataValue();
var finalPrice = 0;
if (vatPercent != 0) {
finalPrice = finalPrice + ((vatPercent / 100) * basePrice);
if (eduCess != 0) {
var eduCessPercent = vatPercent / eduCess;
finalPrice = finalPrice + (eduCessPercent / 100) * basePrice;
}
}
if (serviceTax != 0) {
finalPrice = finalPrice + (serviceTax / 100) * basePrice;
}
if (serviceCharge != 0) {
finalPrice = finalPrice + (serviceCharge / 100) * basePrice;
}
//if (tpsPercInc != 0) {
//finalPrice  = finalPrice + (tpsPercInc / 100) * basePrice;
//}
//else
if (tpsPerExcl != 0) {
finalPrice = finalPrice + (tpsPerExcl / 100) * basePrice;
}
// else if (tpsShareInc != 0) {
///  finalPrice  = finalPrice +
//}
else if (tpsShareExcl != 0) {
tpsShareExcl = tpsShareExcl / 1;
finalPrice = finalPrice + tpsShareExcl;
}
basePrice = basePrice / 1;
finalPrice = finalPrice + basePrice; /* */
this.priceEditor1.setDataValue(finalPrice);
},
itemsSaveButtonClick: function(inSender) {
this.calculateFinalprice();
this.itemsLiveForm1.saveDataIfValid();
},
txtVATChange: function(inSender, inDisplayValue, inDataValue, inSetByCode) {
this.calculateFinalprice();
},
txtServiceTaxChange: function(inSender, inDisplayValue, inDataValue, inSetByCode) {
this.calculateFinalprice();
},
txtVATEnterKeyPress: function(inSender) {
this.calculateFinalprice();
},
txtServiceTaxEnterKeyPress: function(inSender) {
this.calculateFinalprice();
},
txtEduCessChange: function(inSender, inDisplayValue, inDataValue, inSetByCode) {
this.calculateFinalprice();
},
txtServiceChargeChange: function(inSender, inDisplayValue, inDataValue, inSetByCode) {
this.calculateFinalprice();
},
txtBasePriceChange: function(inSender, inDisplayValue, inDataValue, inSetByCode) {
this.calculateFinalprice();
},
txtTpsShareIncPerChange: function(inSender, inDisplayValue, inDataValue, inSetByCode) {
this.calculateFinalprice();
},
txtTpsShareExclPerChange: function(inSender, inDisplayValue, inDataValue, inSetByCode) {
this.calculateFinalprice();
},
txtTpsShareInclChange: function(inSender, inDisplayValue, inDataValue, inSetByCode) {
this.calculateFinalprice();
},
txtTpsShareExclChange: function(inSender, inDisplayValue, inDataValue, inSetByCode) {
this.calculateFinalprice();
},
itemsDojoGridSelect: function(inSender) {
},
_end: 0
});

DVendorItemProductCatalogPg.widgets = {
lvVendors: ["wm.LiveVariable", {"autoUpdate":false,"inFlightBehavior":"executeLast","orderBy":"asc:name","type":"com.servicelivedb.data.Customer"}, {}, {
liveView: ["wm.LiveView", {"dataType":"com.servicelivedb.data.Customer","view":[
{"caption":"CustomerId","sortable":true,"dataIndex":"customerId","type":"java.lang.Integer","displayType":"Number","required":true,"readonly":true,"includeLists":true,"includeForms":true,"order":0,"subType":null},
{"caption":"Address","sortable":true,"dataIndex":"address","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":1,"subType":null},
{"caption":"Email","sortable":true,"dataIndex":"email","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":2,"subType":null},
{"caption":"UpdatedDt","sortable":true,"dataIndex":"updatedDt","type":"java.util.Date","displayType":"Date","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":3,"subType":null},
{"caption":"UpdatedBy","sortable":true,"dataIndex":"updatedBy","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":4,"subType":null},
{"caption":"Active","sortable":true,"dataIndex":"active","type":"java.lang.Boolean","displayType":"CheckBox","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":5,"subType":null},
{"caption":"Password","sortable":true,"dataIndex":"password","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":6,"subType":null},
{"caption":"Username","sortable":true,"dataIndex":"username","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":7,"subType":null},
{"caption":"Name","sortable":true,"dataIndex":"name","type":"java.lang.String","displayType":"Text","required":true,"readonly":false,"includeLists":true,"includeForms":true,"order":8,"subType":null},
{"caption":"PrimaryPhone","sortable":true,"dataIndex":"primaryPhone","type":"java.lang.String","displayType":"Text","required":true,"readonly":false,"includeLists":true,"includeForms":true,"order":9,"subType":null},
{"caption":"SecondaryPhone","sortable":true,"dataIndex":"secondaryPhone","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":10,"subType":null},
{"caption":"Type","sortable":true,"dataIndex":"type","type":"java.lang.String","displayType":"Text","required":true,"readonly":false,"includeLists":true,"includeForms":true,"order":11,"subType":null},
{"caption":"AlternateContact","sortable":true,"dataIndex":"alternateContact","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":12,"subType":null},
{"caption":"Pto","sortable":true,"dataIndex":"pto","type":"java.lang.Boolean","displayType":"CheckBox","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":13,"subType":null},
{"caption":"PtoMessage","sortable":true,"dataIndex":"ptoMessage","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":14,"subType":null},
{"caption":"Vendor_msg","sortable":true,"dataIndex":"vendor_msg","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":15,"subType":null},
{"caption":"Min_order_amount","sortable":true,"dataIndex":"min_order_amount","type":"java.lang.Integer","displayType":"Number","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":16,"subType":null},
{"caption":"Shop_time","sortable":true,"dataIndex":"shop_time","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":17,"subType":null}
]}, {}],
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"expression":"\"VENDOR\"","targetProperty":"filter.type"}, {}]
}]
}],
itemsLiveVariable1: ["wm.LiveVariable", {"autoUpdate":false,"orderBy":"asc:itemName","type":"com.servicelivedb.data.Items"}, {}, {
liveView: ["wm.LiveView", {"dataType":"com.servicelivedb.data.Items","related":["projectServiceVendor","projectServiceVendor.customer","customer","customer.block","customer.door","services"],"view":[
{"caption":"ItemId","sortable":true,"dataIndex":"itemId","type":"java.lang.Integer","displayType":"Number","required":true,"readonly":true,"includeLists":true,"includeForms":true,"order":0,"subType":null},
{"caption":"ItemName","sortable":true,"dataIndex":"itemName","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":1,"subType":null},
{"caption":"ItemDesc","sortable":true,"dataIndex":"itemDesc","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":2,"subType":null},
{"caption":"OutOfStock","sortable":true,"dataIndex":"outOfStock","type":"java.lang.Boolean","displayType":"CheckBox","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":3,"subType":null},
{"caption":"Quantity","sortable":true,"dataIndex":"quantity","type":"java.math.BigDecimal","displayType":"Number","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":4,"subType":null},
{"caption":"Price","sortable":true,"dataIndex":"price","type":"java.math.BigDecimal","displayType":"Number","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":5,"subType":null},
{"caption":"MinQuantity","sortable":true,"dataIndex":"minQuantity","type":"java.math.BigDecimal","displayType":"Number","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":6,"subType":null},
{"caption":"Unit","sortable":true,"dataIndex":"unit","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":7,"subType":null},
{"caption":"OtherNames","sortable":true,"dataIndex":"otherNames","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":8,"subType":null},
{"caption":"UpdatedBy","sortable":true,"dataIndex":"updatedBy","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":9,"subType":null},
{"caption":"UpdatedDt","sortable":true,"dataIndex":"updatedDt","type":"java.util.Date","displayType":"Date","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":10,"subType":null},
{"caption":"ItemType","sortable":true,"dataIndex":"itemType","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":11,"subType":null},
{"caption":"Brand","sortable":true,"dataIndex":"brand","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":12,"subType":null},
{"caption":"Discount","sortable":true,"dataIndex":"discount","type":"java.math.BigDecimal","displayType":"Number","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":13,"subType":null},
{"caption":"VendorPrice","sortable":true,"dataIndex":"vendorPrice","type":"java.math.BigDecimal","displayType":"Number","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":14,"subType":null},
{"caption":"ServiceCharge","sortable":true,"dataIndex":"serviceCharge","type":"java.math.BigDecimal","displayType":"Number","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":15,"subType":null},
{"caption":"AvailibilityStartDt","sortable":true,"dataIndex":"availibilityStartDt","type":"java.util.Date","displayType":"Date","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":16,"subType":null},
{"caption":"AvailibilityEndDt","sortable":true,"dataIndex":"availibilityEndDt","type":"java.util.Date","displayType":"Date","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":17,"subType":null},
{"caption":"Tax","sortable":true,"dataIndex":"tax","type":"java.math.BigDecimal","displayType":"Number","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":18,"subType":null},
{"caption":"Active","sortable":true,"dataIndex":"active","type":"java.lang.Boolean","displayType":"CheckBox","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":19,"subType":null},
{"caption":"ImageUrl","sortable":true,"dataIndex":"imageUrl","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":20,"subType":null},
{"caption":"Currency","sortable":true,"dataIndex":"currency","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":21,"subType":null},
{"caption":"OtherCharges","sortable":true,"dataIndex":"otherCharges","type":"java.math.BigDecimal","displayType":"Number","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":22,"subType":null},
{"caption":"DeliveryCharges","sortable":true,"dataIndex":"deliveryCharges","type":"java.math.BigDecimal","displayType":"Number","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":23,"subType":null},
{"caption":"TpsShareExl","sortable":true,"dataIndex":"tpsShareExl","type":"java.math.BigDecimal","displayType":"Number","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":24,"subType":null},
{"caption":"TpsShareIncl","sortable":true,"dataIndex":"tpsShareIncl","type":"java.math.BigDecimal","displayType":"Number","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":25,"subType":null},
{"caption":"TpsPercentExl","sortable":true,"dataIndex":"tpsPercentExl","type":"java.math.BigDecimal","displayType":"Number","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":26,"subType":null},
{"caption":"TpsPercentIncl","sortable":true,"dataIndex":"tpsPercentIncl","type":"java.math.BigDecimal","displayType":"Number","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":27,"subType":null},
{"caption":"EduCess","sortable":true,"dataIndex":"eduCess","type":"java.math.BigDecimal","displayType":"Number","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":28,"subType":null},
{"caption":"ServiceTax","sortable":true,"dataIndex":"serviceTax","type":"java.math.BigDecimal","displayType":"Number","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":29,"subType":null},
{"caption":"Vat","sortable":true,"dataIndex":"vat","type":"java.math.BigDecimal","displayType":"Number","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":30,"subType":null},
{"caption":"BaseValue","sortable":true,"dataIndex":"baseValue","type":"java.math.BigDecimal","displayType":"Number","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":31,"subType":null}
]}, {}],
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"expression":undefined,"source":"[main].lvLoggedCustomer.customerId","targetProperty":"filter.customer.customerId"}, {}]
}]
}],
lvService: ["wm.LiveVariable", {"inFlightBehavior":"executeLast","orderBy":"asc:serviceName","type":"com.servicelivedb.data.Services"}, {}, {
liveView: ["wm.LiveView", {"dataType":"com.servicelivedb.data.Services","view":[
{"caption":"ServiceId","sortable":true,"dataIndex":"serviceId","type":"java.lang.Integer","displayType":"Number","required":true,"readonly":true,"includeLists":true,"includeForms":true,"order":0,"subType":null},
{"caption":"ServiceName","sortable":true,"dataIndex":"serviceName","type":"java.lang.String","displayType":"Text","required":true,"readonly":false,"includeLists":true,"includeForms":true,"order":1,"subType":null}
]}, {}],
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"expression":undefined,"source":"selectMenu1.selectedItem","targetProperty":"filter.customer"}, {}]
}]
}],
itemsDialog: ["wm.DesignableDialog", {"buttonBarId":"buttonBar","containerWidgetId":"containerWidget","desktopHeight":"450px","height":"450px","mobileHeight":"450px","title":"items","width":"800px"}, {}, {
containerWidget: ["wm.Container", {"_classes":{"domNode":["wmdialogcontainer","MainContent"]},"autoScroll":true,"height":"100%","horizontalAlign":"left","padding":"5","verticalAlign":"top","width":"100%"}, {}, {
itemsLiveForm1: ["wm.LiveForm", {"alwaysPopulateEditors":true,"captionSize":"150px","height":"100%","horizontalAlign":"left","layoutKind":"left-to-right","liveEditing":false,"margin":"4","verticalAlign":"top"}, {"onSuccess":"itemsLivePanel1.popupLiveFormSuccess"}, {
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"expression":undefined,"source":"itemsDojoGrid.selectedItem","targetProperty":"dataSet"}, {}]
}],
panel4: ["wm.Panel", {"height":"100%","horizontalAlign":"left","verticalAlign":"top","width":"100%"}, {}, {
itemNameEditor1: ["wm.Text", {"border":"0","caption":"ItemName","captionSize":"150px","changeOnKey":true,"desktopHeight":"26px","emptyValue":"emptyString","formField":"itemName","height":"26px","required":true,"width":"100%"}, {}],
itemDescEditor1: ["wm.Text", {"border":"0","caption":"ItemDesc","captionSize":"150px","changeOnKey":true,"desktopHeight":"26px","emptyValue":"emptyString","formField":"itemDesc","height":"26px","width":"100%"}, {}],
itemType: ["wm.SelectMenu", {"border":"0","caption":"ItemType","captionSize":"150px","dataField":"dataValue","desktopHeight":"26px","displayField":"dataValue","formField":"itemType","height":"26px","options":"Food, Electronics","restrictValues":false,"styles":{},"width":"100%"}, {}],
otherNamesEditor1: ["wm.Text", {"border":"0","caption":"OtherNames","captionSize":"150px","changeOnKey":true,"desktopHeight":"26px","emptyValue":"emptyString","formField":"otherNames","height":"26px","width":"100%"}, {}],
updatedByEditor1: ["wm.Text", {"border":"0","caption":"UpdatedBy","captionSize":"150px","changeOnKey":true,"defaultInsert":"ADMIN","desktopHeight":"26px","emptyValue":"emptyString","formField":"updatedBy","height":"26px","showing":false,"width":"100%"}, {}],
updatedDtEditor1: ["wm.DateTime", {"border":"0","caption":"UpdatedDt","captionSize":"150px","dateMode":"Date","desktopHeight":"26px","emptyValue":"zero","formField":"updatedDt","height":"26px","showing":false,"width":"100%"}, {}, {
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"expression":"new Date()","targetProperty":"defaultInsert"}, {}]
}]
}],
brandEditor1: ["wm.Text", {"border":"0","caption":"Brand","captionSize":"150px","changeOnKey":true,"desktopHeight":"26px","emptyValue":"emptyString","formField":"brand","height":"26px","showing":false,"width":"100%"}, {}],
availibilityStartDtEditor1: ["wm.DateTime", {"border":"0","caption":"AvailibilityStartDt","captionSize":"150px","dateMode":"Date","desktopHeight":"26px","emptyValue":"zero","formField":"availibilityStartDt","height":"26px","showing":false,"width":"100%"}, {}],
availibilityEndDtEditor1: ["wm.DateTime", {"border":"0","caption":"AvailibilityEndDt","captionSize":"150px","dateMode":"Date","desktopHeight":"26px","emptyValue":"zero","formField":"availibilityEndDt","height":"26px","showing":false,"width":"100%"}, {}],
lookup1: ["wm.Lookup", {"autoDataSet":false,"border":"0","caption":"Vendor","captionSize":"150px","dataType":"com.servicelivedb.data.Customer","desktopHeight":"26px","disabled":true,"displayField":"name","formField":"customer","height":"26px","readonly":true,"required":true,"width":"100%"}, {}, {
binding: ["wm.Binding", {}, {}, {
dataFieldWire: ["wm.Wire", {"source":"lookup1.liveVariable","targetProperty":"dataSet"}, {}],
wire: ["wm.Wire", {"expression":undefined,"source":"lvVendors","targetProperty":"dataSet"}, {}],
wire1: ["wm.Wire", {"expression":undefined,"source":"selectMenu1.selectedItem","targetProperty":"defaultInsert"}, {}],
wire2: ["wm.Wire", {"expression":undefined,"source":"selectMenu1.selectedItem","targetProperty":"dataValue"}, {}]
}]
}],
lookup2: ["wm.Lookup", {"autoDataSet":false,"border":"0","caption":"Services","captionSize":"150px","dataType":"com.servicelivedb.data.Services","defaultInsert":"","desktopHeight":"26px","displayField":"serviceName","formField":"services","height":"26px","required":true,"width":"100%"}, {}, {
binding: ["wm.Binding", {}, {}, {
dataFieldWire: ["wm.Wire", {"source":"lookup2.liveVariable","targetProperty":"dataSet"}, {}],
wire: ["wm.Wire", {"expression":undefined,"source":"lvService","targetProperty":"dataSet"}, {}]
}]
}],
outOfStockEditor1: ["wm.Checkbox", {"border":"0","caption":"OutOfStock","captionSize":"150px","desktopHeight":"26px","displayValue":false,"formField":"outOfStock","height":"26px","width":"100%"}, {}],
otherNamesEditor3: ["wm.Text", {"border":"0","caption":"Currency","captionSize":"150px","changeOnKey":true,"defaultInsert":"Rs","desktopHeight":"26px","emptyValue":"emptyString","formField":"currency","height":"26px","width":"100%"}, {}],
activeEditor1: ["wm.Checkbox", {"border":"0","caption":"Active","captionSize":"150px","desktopHeight":"26px","displayValue":true,"formField":"active","height":"26px","startChecked":true,"width":"100%"}, {}, {
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"expression":"true","targetProperty":"defaultInsert"}, {}]
}]
}],
selectMenu3: ["wm.SelectMenu", {"border":"0","caption":"Unit","captionSize":"150px","dataField":"dataValue","desktopHeight":"26px","displayField":"dataValue","formField":"unit","height":"26px","options":"Nos,0.5 Kg, 1Kg, 0.5Litre,1Litre,Plate,Cup","restrictValues":false,"width":"100%"}, {}],
labelFileName: ["wm.Label", {"padding":"4","width":"100%"}, {}, {
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"expression":undefined,"source":"dojoFileUpload1.variable.name","targetProperty":"caption"}, {}]
}]
}],
dojoFileUpload1: ["wm.DojoFileUpload", {"buttonCaption":"Click to Upload Image","buttonWidth":100,"height":"50px","styles":{"color":"#1c3ba1"},"useList":false,"width":"100%"}, {}, {
input: ["wm.ServiceInput", {"type":"uploadFileInputs"}, {}, {
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"expression":"''+${lookup1.selectedItem.customerId}","targetProperty":"vendorId"}, {}]
}]
}]
}],
listProjectServices: ["wm.List", {"_classes":{"domNode":["MobileListStyle"]},"border":"1","columns":[
{"show":false,"field":"active","title":"Active","width":"100%","align":"left","formatFunc":"","mobileColumn":false},
{"show":false,"field":"PHONE COLUMN","title":"-","width":"100%","align":"left","expression":"","mobileColumn":false},
{"show":false,"field":"services.serviceId","title":"Services.serviceId","width":"80px","align":"left","formatFunc":"","mobileColumn":false},
{"show":false,"field":"services.serviceName","title":"Service","width":"100%","align":"left","formatFunc":"","editorProps":{"restrictValues":true},"mobileColumn":true},
{"show":false,"field":"projectServiceVendorId","title":"ProjectServiceVendorId","width":"80px","align":"left","formatFunc":"","mobileColumn":false},
{"show":false,"field":"project.projectId","title":"Project.projectId","width":"80px","align":"left","formatFunc":"","mobileColumn":false},
{"show":false,"field":"project.projectName","title":"Project.projectName","width":"100%","align":"left","formatFunc":"","mobileColumn":false},
{"show":false,"field":"project.active","title":"Project.active","width":"100%","align":"left","formatFunc":"","mobileColumn":false},
{"show":false,"field":"customer.customerId","title":"Customer.customerId","width":"80px","align":"left","formatFunc":"","mobileColumn":false},
{"show":false,"field":"customer.address","title":"Customer.address","width":"100%","align":"left","formatFunc":"","mobileColumn":false},
{"show":false,"field":"customer.email","title":"Customer.email","width":"100%","align":"left","formatFunc":"","mobileColumn":false},
{"show":false,"field":"customer.updatedDt","title":"Customer.updatedDt","width":"80px","align":"left","formatFunc":"wm_date_formatter","mobileColumn":false},
{"show":false,"field":"customer.updatedBy","title":"Customer.updatedBy","width":"100%","align":"left","formatFunc":"","mobileColumn":false},
{"show":false,"field":"customer.active","title":"Customer.active","width":"100%","align":"left","formatFunc":"","mobileColumn":false},
{"show":false,"field":"customer.password","title":"Customer.password","width":"100%","align":"left","formatFunc":"","mobileColumn":false},
{"show":false,"field":"customer.username","title":"Customer.username","width":"100%","align":"left","formatFunc":"","mobileColumn":false},
{"show":false,"field":"customer.name","title":"Customer.name","width":"100%","align":"left","formatFunc":"","editorProps":{"restrictValues":true},"mobileColumn":true},
{"show":false,"field":"customer.primaryPhone","title":"Customer.primaryPhone","width":"100%","align":"left","formatFunc":"","mobileColumn":false},
{"show":false,"field":"customer.secondaryPhone","title":"Customer.secondaryPhone","width":"100%","align":"left","formatFunc":"","mobileColumn":false},
{"show":false,"field":"customer.type","title":"Customer.type","width":"100%","align":"left","formatFunc":"","mobileColumn":false},
{"show":false,"field":"customer.alternateContact","title":"Customer.alternateContact","width":"100%","align":"left","formatFunc":"","mobileColumn":false},
{"show":false,"field":"customer.pto","title":"Customer.pto","width":"100%","displayType":"CheckBox","align":"left","formatFunc":""},
{"show":false,"field":"customer.ptoMessage","title":"Customer.ptoMessage","width":"100%","displayType":"Text","align":"left","formatFunc":""},
{"show":true,"controller":"rightarrow","width":"20px","title":"-","field":"_rightArrow","mobileColumn":true}
],"headerVisible":false,"height":"100%","isNavigationMenu":true,"margin":"0,2,0,0","minDesktopHeight":100,"minHeight":100,"rightNavArrow":true,"styleAsGrid":false,"styles":{}}, {"onSelect":"listProjectServicesSelect"}, {
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"expression":undefined,"source":"lvProjectServices","targetProperty":"dataSet"}, {}]
}]
}]
}],
panel3: ["wm.Panel", {"height":"100%","horizontalAlign":"left","verticalAlign":"top","width":"100%"}, {}, {
vendorPriceEditor1: ["wm.Number", {"border":"0","caption":"VendorPrice","captionSize":"150px","changeOnKey":true,"desktopHeight":"26px","emptyValue":"zero","formField":"vendorPrice","height":"26px","showing":false,"width":"100%"}, {}],
txtBasePrice: ["wm.Text", {"border":"0","caption":"Base Price","captionSize":"150px","desktopHeight":"26px","emptyValue":"zero","formField":"baseValue","height":"26px","regExp":"^[0-9]\\d{0,9}(\\.\\d{1,2})?%?$","required":true,"styles":{},"width":"100%"}, {"onchange":"txtBasePriceChange"}],
txtVAT: ["wm.Text", {"border":"0","caption":"Vat %","captionSize":"150px","desktopHeight":"26px","emptyValue":"zero","formField":"vat","height":"26px","regExp":"^[0-9]\\d{0,9}(\\.\\d{1,2})?%?$","styles":{},"width":"100%"}, {"onchange":"txtVATChange"}],
txtEduCess: ["wm.Text", {"border":"0","caption":"Education Cess % of VAT","captionSize":"150px","desktopHeight":"26px","emptyValue":"zero","formField":"eduCess","height":"26px","regExp":"^[0-9]\\d{0,9}(\\.\\d{1,2})?%?$","styles":{},"width":"100%"}, {"onchange":"txtEduCessChange"}],
quantityEditor1: ["wm.Number", {"border":"0","caption":"Quantity","captionSize":"150px","changeOnKey":true,"desktopHeight":"26px","emptyValue":"zero","formField":"quantity","height":"26px","showing":false,"width":"100%"}, {}],
txtServiceTax: ["wm.Text", {"border":"0","caption":"Service Tax %","captionSize":"150px","desktopHeight":"26px","emptyValue":"zero","formField":"serviceTax","height":"26px","regExp":"^[0-9]\\d{0,9}(\\.\\d{1,2})?%?$","styles":{},"width":"100%"}, {"onchange":"txtServiceTaxChange"}],
txtServiceCharge: ["wm.Text", {"border":"0","caption":"ServiceCharge %","captionSize":"150px","desktopHeight":"26px","emptyValue":"zero","formField":"serviceCharge","height":"26px","regExp":"^[0-9]\\d{0,9}(\\.\\d{1,2})?%?$","styles":{},"width":"100%"}, {"onchange":"txtServiceChargeChange"}],
txtTpsShareIncPer: ["wm.Text", {"border":"0","caption":"TPS % incl","captionSize":"150px","desktopHeight":"26px","emptyValue":"zero","formField":"tpsPercentIncl","height":"26px","regExp":"^[0-9]\\d{0,9}(\\.\\d{1,2})?%?$","styles":{},"width":"384px"}, {"onchange":"txtTpsShareIncPerChange"}],
txtTpsShareExclPer: ["wm.Text", {"border":"0","caption":"TPS % excl","captionSize":"150px","desktopHeight":"26px","emptyValue":"zero","formField":"tpsPercentExl","height":"26px","regExp":"^[0-9]\\d{0,9}(\\.\\d{1,2})?%?$","styles":{},"width":"100%"}, {"onchange":"txtTpsShareExclPerChange"}],
txtTpsShareIncl: ["wm.Text", {"border":"0","caption":"TPS Share inclu","captionSize":"150px","desktopHeight":"26px","emptyValue":"zero","formField":"tpsShareIncl","height":"26px","regExp":"^[0-9]\\d{0,9}(\\.\\d{1,2})?%?$","styles":{},"width":"100%"}, {"onchange":"txtTpsShareInclChange"}],
txtTpsShareExcl: ["wm.Text", {"border":"0","caption":"TPS Share excl","captionSize":"150px","desktopHeight":"26px","emptyValue":"zero","formField":"tpsShareExl","height":"26px","regExp":"^[0-9]\\d{0,9}(\\.\\d{1,2})?%?$","styles":{},"width":"100%"}, {"onchange":"txtTpsShareExclChange"}],
discountEditor1: ["wm.Number", {"border":"0","caption":"Discount","captionSize":"150px","changeOnKey":true,"desktopHeight":"26px","emptyValue":"zero","formField":"discount","height":"26px","showing":false,"width":"100%"}, {}],
priceEditor1: ["wm.Number", {"border":"0","caption":"Total Price","captionSize":"150px","changeOnKey":true,"desktopHeight":"26px","disabled":true,"emptyValue":"zero","formField":"price","height":"26px","styles":{},"width":"100%"}, {}],
itemDescEditor2: ["wm.LargeTextArea", {"border":"0","caption":"ImageUrl","captionAlign":"right","captionPosition":"left","captionSize":"60px","changeOnKey":true,"desktopHeight":"50px","emptyValue":"emptyString","formField":"imageUrl","height":"50px","width":"385px"}, {}, {
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"expression":undefined,"source":"dojoFileUpload1.variable.path","targetProperty":"dataValue"}, {}]
}]
}]
}]
}]
}],
buttonBar: ["wm.Panel", {"_classes":{"domNode":["dialogfooter"]},"border":"1,0,0,0","desktopHeight":"32px","enableTouchHeight":true,"height":"32px","horizontalAlign":"right","layoutKind":"left-to-right","mobileHeight":"40px","verticalAlign":"top","width":"100%"}, {}, {
itemsSaveButton: ["wm.Button", {"border":"1","caption":"Save","height":"100%"}, {"onclick":"itemsSaveButtonClick"}, {
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"source":"itemsLiveForm1.invalid","targetId":null,"targetProperty":"disabled"}, {}]
}]
}],
itemsCancelButton: ["wm.Button", {"border":"1","caption":"Cancel","height":"100%"}, {"onclick":"itemsDialog.hide","onclick1":"itemsLiveForm1.cancelEdit"}]
}]
}],
layoutBox1: ["wm.Layout", {"horizontalAlign":"left","verticalAlign":"top"}, {}, {
panel1: ["wm.Panel", {"height":"100%","horizontalAlign":"left","verticalAlign":"top","width":"100%"}, {}, {
panel2: ["wm.Panel", {"desktopHeight":"37px","enableTouchHeight":true,"height":"37px","horizontalAlign":"left","layoutKind":"left-to-right","mobileHeight":"40px","verticalAlign":"middle","width":"100%"}, {}, {
button1: ["wm.Button", {"border":"1","caption":"Refresh"}, {"onclick":"lvVendors"}]
}],
itemsLivePanel1: ["wm.LivePanel", {"autoScroll":false,"horizontalAlign":"left","verticalAlign":"top"}, {}, {
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"source":"itemsDialog","targetId":null,"targetProperty":"dialog"}, {}],
wire1: ["wm.Wire", {"source":"itemsLiveForm1","targetId":null,"targetProperty":"liveForm"}, {}],
wire2: ["wm.Wire", {"source":"itemsDojoGrid","targetId":null,"targetProperty":"dataGrid"}, {}],
wire3: ["wm.Wire", {"source":"itemsSaveButton","targetId":null,"targetProperty":"saveButton"}, {}]
}],
itemsDojoGrid: ["wm.DojoGrid", {"columns":[
{"show":false,"field":"itemId","title":"ItemId","width":"80px","align":"right","formatFunc":"","editorProps":{"restrictValues":true},"mobileColumn":false},
{"show":true,"field":"imageUrl","title":"Image","width":"103px","align":"left","formatFunc":"itemsDojoGridImageUrlFormat","formatProps":null,"editorProps":{"restrictValues":true},"mobileColumn":false},
{"show":true,"field":"itemName","title":"Name","width":"110px","align":"left","formatFunc":"","editorProps":{"restrictValues":true},"mobileColumn":false},
{"show":true,"field":"price","title":"Price","width":"60px","align":"left","formatFunc":"","editorProps":{"restrictValues":true},"mobileColumn":false},
{"show":true,"field":"itemDesc","title":"Description","width":"150px","align":"left","formatFunc":"","editorProps":{"restrictValues":true},"mobileColumn":false},
{"show":true,"field":"active","title":"Active","width":"91px","align":"left","formatFunc":"","editorProps":{"restrictValues":true},"mobileColumn":false},
{"show":true,"field":"updatedDt","title":"UpdatedDt","width":"157px","align":"left","formatFunc":"wm_date_formatter","formatProps":{"formatLength":"medium"},"editorProps":{"restrictValues":true},"mobileColumn":false},
{"show":true,"field":"outOfStock","title":"OutOfStock","width":"89px","align":"left","formatFunc":"","editorProps":{"restrictValues":true},"mobileColumn":false},
{"show":true,"field":"unit","title":"Unit","width":"50px","align":"left","formatFunc":"","editorProps":{"restrictValues":true},"mobileColumn":false},
{"show":false,"field":"minQuantity","title":"MinQuantity","width":"111px","align":"right","formatFunc":"","formatProps":null,"editorProps":{"restrictValues":true},"mobileColumn":false},
{"show":false,"field":"brand","title":"Brand","width":"100%","align":"left","formatFunc":"","mobileColumn":false},
{"show":false,"field":"vendorPrice","title":"VendorPrice","width":"80px","align":"right","formatFunc":"","mobileColumn":false},
{"show":true,"field":"serviceCharge","title":"ServiceCharge","width":"118px","align":"left","formatFunc":"","editorProps":{"restrictValues":true},"mobileColumn":false},
{"show":false,"field":"availibilityStartDt","title":"AvailibilityStartDt","width":"80px","align":"left","formatFunc":"wm_date_formatter","editorProps":{"restrictValues":true},"mobileColumn":false},
{"show":false,"field":"availibilityEndDt","title":"AvailibilityEndDt","width":"80px","align":"left","formatFunc":"wm_date_formatter","mobileColumn":false},
{"show":false,"field":"PHONE COLUMN","title":"-","width":"100%","align":"left","expression":"\"<div class='MobileRowTitle'>\" +\n\"Image: \" + ${wm.runtimeId}.formatCell(\"imageUrl\", ${imageUrl}, ${this}, ${wm.rowId}) +\n\"</div>\"\n\n+ \"<div class='MobileRow'>\" +\n\"Name: \" + ${itemName}\n + \"</div>\"\n\n+ \"<div class='MobileRow'>\" +\n\"Price: \" + ${price}\n + \"</div>\"\n\n+ \"<div class='MobileRow'>\" +\n\"Description: \" + ${itemDesc}\n + \"</div>\"\n\n+ \"<div class='MobileRow'>\" +\n\"Active: \" + ${active}\n + \"</div>\"\n\n+ \"<div class='MobileRow'>\" +\n\"UpdatedDt: \" + ${wm.runtimeId}.formatCell(\"updatedDt\", ${updatedDt}, ${this}, ${wm.rowId})\n + \"</div>\"\n\n+ \"<div class='MobileRow'>\" +\n\"OutOfStock: \" + ${outOfStock}\n + \"</div>\"\n\n+ \"<div class='MobileRow'>\" +\n\"Unit: \" + ${unit}\n + \"</div>\"\n\n+ \"<div class='MobileRow'>\" +\n\"ServiceCharge: \" + ${serviceCharge}\n + \"</div>\"\n\n+ \"<div class='MobileRow'>\" +\n\"Vat: \" + ${vat}\n + \"</div>\"\n\n+ \"<div class='MobileRow'>\" +\n\"Tax: \" + ${tax}\n + \"</div>\"\n\n+ \"<div class='MobileRow'>\" +\n\"EduCess: \" + ${eduCess}\n + \"</div>\"\n\n+ \"<div class='MobileRow'>\" +\n\"Discount: \" + ${discount}\n + \"</div>\"\n\n+ \"<div class='MobileRow'>\" +\n\"DeliveryCharges: \" + ${deliveryCharges}\n + \"</div>\"\n\n+ \"<div class='MobileRow'>\" +\n\"TpsPercentExl: \" + ${tpsPercentExl}\n + \"</div>\"\n\n+ \"<div class='MobileRow'>\" +\n\"Currency: \" + ${currency}\n + \"</div>\"\n\n+ \"<div class='MobileRow'>\" +\n\"ServiceTax: \" + ${serviceTax}\n + \"</div>\"\n\n+ \"<div class='MobileRow'>\" +\n\"TpsShareIncl: \" + ${tpsShareIncl}\n + \"</div>\"\n\n+ \"<div class='MobileRow'>\" +\n\"ItemType: \" + ${itemType}\n + \"</div>\"\n\n+ \"<div class='MobileRow'>\" +\n\"TpsPercentIncl: \" + ${tpsPercentIncl}\n + \"</div>\"\n\n+ \"<div class='MobileRow'>\" +\n\"OtherCharges: \" + ${otherCharges}\n + \"</div>\"\n\n+ \"<div class='MobileRow'>\" +\n\"TpsShareExl: \" + ${tpsShareExl}\n + \"</div>\"\n\n+ \"<div class='MobileRow'>\" +\n\"OtherNames: \" + ${otherNames}\n + \"</div>\"\n\n+ \"<div class='MobileRow'>\" +\n\"Quantity: \" + ${quantity}\n + \"</div>\"\n\n+ \"<div class='MobileRow'>\" +\n\"BaseValue: \" + ${baseValue}\n + \"</div>\"\n\n+ \"<div class='MobileRow'>\" +\n\"UpdatedBy: \" + ${updatedBy}\n + \"</div>\"\n\n","mobileColumn":true},
{"show":true,"field":"vat","title":"Vat","width":"80px","align":"left","formatFunc":"","mobileColumn":false},
{"show":true,"field":"tax","title":"Tax","width":"80px","align":"left","formatFunc":"","editorProps":{"restrictValues":true},"mobileColumn":false},
{"show":true,"field":"eduCess","title":"EduCess","width":"88px","align":"left","formatFunc":"","editorProps":{"restrictValues":true},"mobileColumn":false},
{"show":true,"field":"discount","title":"Discount","width":"108px","align":"left","formatFunc":"","editorProps":{"restrictValues":true},"mobileColumn":false},
{"show":true,"field":"deliveryCharges","title":"DeliveryCharges","width":"133px","align":"left","formatFunc":"","editorProps":{"restrictValues":true},"mobileColumn":false},
{"show":true,"field":"tpsPercentExl","title":"TpsPercentExl","width":"125px","align":"left","formatFunc":"","editorProps":{"restrictValues":true},"mobileColumn":false},
{"show":true,"field":"currency","title":"Currency","width":"96px","align":"left","formatFunc":"","editorProps":{"restrictValues":true},"mobileColumn":false},
{"show":true,"field":"serviceTax","title":"ServiceTax","width":"117px","align":"left","formatFunc":"","editorProps":{"restrictValues":true},"mobileColumn":false},
{"show":true,"field":"tpsShareIncl","title":"TpsShareIncl","width":"117px","align":"left","formatFunc":"","editorProps":{"restrictValues":true},"mobileColumn":false},
{"show":true,"field":"itemType","title":"ItemType","width":"80px","align":"left","formatFunc":"","editorProps":{"restrictValues":true},"mobileColumn":false},
{"show":true,"field":"tpsPercentIncl","title":"TpsPercentIncl","width":"113px","align":"left","formatFunc":"","editorProps":{"restrictValues":true},"mobileColumn":false},
{"show":true,"field":"otherCharges","title":"OtherCharges","width":"103px","align":"left","formatFunc":"","editorProps":{"restrictValues":true},"mobileColumn":false},
{"show":true,"field":"tpsShareExl","title":"TpsShareExl","width":"99px","align":"left","formatFunc":"","editorProps":{"restrictValues":true},"mobileColumn":false},
{"show":true,"field":"otherNames","title":"OtherNames","width":"76px","align":"left","formatFunc":"","editorProps":{"restrictValues":true},"mobileColumn":false},
{"show":true,"field":"quantity","title":"Quantity","width":"43px","align":"left","formatFunc":"","editorProps":{"restrictValues":true},"mobileColumn":false},
{"show":true,"field":"baseValue","title":"BaseValue","width":"80px","align":"left","formatFunc":"","editorProps":{"restrictValues":true},"mobileColumn":false},
{"show":true,"field":"updatedBy","title":"UpdatedBy","width":"131px","align":"left","formatFunc":"","editorProps":{"restrictValues":true},"mobileColumn":false}
],"dsType":"com.servicelivedb.data.Items","height":"100%","localizationStructure":{},"minDesktopHeight":60}, {"onCellDblClick":"itemsLivePanel1.popupLivePanelEdit"}, {
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"expression":undefined,"source":"itemsLiveVariable1","targetProperty":"dataSet"}, {}]
}]
}],
itemsGridButtonPanel: ["wm.Panel", {"desktopHeight":"32px","enableTouchHeight":true,"height":"32px","horizontalAlign":"right","layoutKind":"left-to-right","mobileHeight":"40px","verticalAlign":"top","width":"100%"}, {}, {
itemsNewButton: ["wm.Button", {"border":"1","caption":"New"}, {"onclick":"itemsLivePanel1.popupLivePanelInsert","onclick1":"itemsNewButtonClick1"}],
itemsUpdateButton: ["wm.Button", {"border":"1","caption":"Update"}, {"onclick":"itemsLivePanel1.popupLivePanelEdit"}, {
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"source":"itemsDojoGrid.emptySelection","targetId":null,"targetProperty":"disabled"}, {}]
}]
}],
itemsDeleteButton: ["wm.Button", {"border":"1","caption":"Delete"}, {"onclick":"itemsLiveForm1.deleteData"}, {
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"source":"itemsDojoGrid.emptySelection","targetId":null,"targetProperty":"disabled"}, {}]
}]
}]
}]
}]
}]
}]
};

DVendorItemProductCatalogPg.prototype._cssText = '';
DVendorItemProductCatalogPg.prototype._htmlText = '';